package cas.ihep.pwa.evtgen;

public class EvtSpinType {

    public enum SpinType{
        SCALAR,VECTOR,TENSOR,DIRAC,PHOTON,NEUTRINO,STRING,
        RARITASCHWINGER,SPIN3,SPIN4,SPIN5HALF,SPIN7HALF
    }
    public static int getSpin2(SpinType stype){
        switch (stype){
            case SCALAR: case STRING:
                return 0;
            case DIRAC: case NEUTRINO:
                return 1;
            case VECTOR: case PHOTON:
                return 2;
            case RARITASCHWINGER:
                return 3;
            case TENSOR:
                return 4;
            case SPIN5HALF:
                return 5;
            case SPIN3:
                return 6;
            case SPIN7HALF:
                return 7;
            case SPIN4:
                return 8;
            default:
                //report(ERROR,"EvtGen")<<"Unknown spintype in EvtSpinType!"<<std::endl;
                return 0;
        }
    }

    public static int getSpinStates(SpinType stype){
        switch (stype){
            case SCALAR: case STRING: case NEUTRINO:
                return 1;
            case DIRAC: case PHOTON:
                return 2;
            case VECTOR:
                return 3;
            case RARITASCHWINGER:
                return 4;
            case TENSOR:
                return 5;
            case SPIN5HALF:
                return 6;
            case SPIN3:
                return 7;
            case SPIN7HALF:
                return 8;
            case SPIN4:
                return 9;
            default:
                //"Unknown spintype in EvtSpinType!"
                return 0;
        }
    }
}
